#ifndef EL_BINARY_SEARCH_H
#define EL_BINARY_SEARCH_H

#include "Messi.h"
namespace elloop_test {
	class BinarySearch : public Messi {
	public:
		BinarySearch();
		virtual ~BinarySearch();
		BinarySearch* run();
		enum SearchType { ByIndex, ByValue};
	protected:
		void _initValueList();
	private:
		void _doSearch(int data, SearchType searchType = ByIndex);
		int _bsearchValue(int value);
		int *valueList;
		const int mLength;
	};
}


#endif